import request from '@/utils/request'
// 全部角色
export function getRoles(params) {
  return request({
    url: '/sys/role',
    params
  })
}
// 删除
export function deleteRole(id) {
  return request({
    url: `/sys/role/${id}`,
    method: 'DELETE'
  })
}
// 新增
export function addRole(data) {
  return request({
    url: '/sys/role',
    method: 'POST',
    data
  })
}
// 编辑
export function addRoleEdit(data) {
  return request({
    url: `/sys/role/${data.id}`,
    method: 'PuT',
    data
  })
}
